//
//  JianXiTableViewCell.m
//  jingjing2.0
//
//  Created by apple on 16/5/5.
//  Copyright © 2016年 apple. All rights reserved.
//

#import "JianXiTableViewCell.h"

@implementation JianXiTableViewCell

- (void)awakeFromNib {
    [super awakeFromNib];
    self.addBtn.label=self.numberCount;
    self.addBtn.btn=self.minBtn;
    self.minBtn.btn=self.addBtn;
    self.minBtn.label=self.numberCount;
    self.addBtn.number=0;
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated
{
    [super setSelected:selected animated:animated];

}

- (IBAction)clickOnAdd:(id)sender {
    CustomButton *btn=sender;
    self.shopCartBlock(self.headImage);
    if ([_delegate respondsToSelector:@selector(doThingsOnControllerForView:withType:)]) {
        [_delegate doThingsOnControllerForView:btn withType:YES];
    }
}
- (IBAction)clickOnMin:(id)sender {
    CustomButton *btn=sender;
    if ([_delegate respondsToSelector:@selector(doThingsOnControllerForView:withType:)]) {
        [_delegate doThingsOnControllerForView:btn withType:NO];
    }
}
@end
